/*
 * NumericStatistics.cpp
 *
 *  Created on: 23 mai 2010
 *      Author: Mario
 */

#include "NumericStatistics.h"

void NumericStatistics::operator()(double value) {
	++count_;
	x_ += value;
	x_squared_ += value * value;
}
;

double NumericStatistics::mean() {
	return x_ / count_;
}


double NumericStatistics::variance() {
	return x_squared_ / count_ - mean() * mean();
}


